{template "header.html", "/"}

<div class="page-container">
    <div class="page-content-wrapper">

        <div class="page-content">
            <div class="container">

                <ul class="page-breadcrumb breadcrumb">
                    <li><a href="{SITE_URL}">首页</a><i class="fa fa-angle-right"></i></li>
                    <li><a href="{MODULE_URL}">{MODULE_NAME}</a><i class="fa fa-angle-right"></i></li>
                    {dr_catpos($catid, '', 1, '<li><a href="{url}">{name}</a><i class="fa fa-angle-right"></i></li>'.PHP_EOL)}
                    <li> <span>搜索</span></li>
                </ul>


                <div class="news-search">
                    <div class="news-search-param">
                        <div class="news-search-param-name">栏目分类：</div>
                        <div class="news-search-param-value">
                            <a class="label {if !$catid || $cat.child}label-success{else}label-default{/if}" href="{dr_search_url($params, 'catid', NULL)}">不限</a>
                            <!--调用栏目分类，这种用法只能用于模块列表与搜索页面-->
                            {loop $related $t}
                            <a class="label {if $t.id==$catid}label-success{else}label-default{/if}" href="{dr_search_url($params, 'catid', $t.id)}">{$t.name}</a>
                            {/loop}
                        </div>
                    </div>

                    <!--工作地区-->
                    <div class="news-search-param">
                        <div class="news-search-param-name">工作地区：</div>
                        <div class="news-search-param-value">
                            <a class="label {if !$params.gongzuodiqu || dr_linkage('address', $params.gongzuodiqu, 0, 'child')}label-success{else}label-default{/if}" href="{dr_search_url($params, 'gongzuodiqu', NULL)}">不限</a>

                            <!--调用联动菜单address，pid为动态获取的地区id-->
                            {linkage code=address pid=$params.gongzuodiqu}
                            <a class="label {if $t.id==$params.gongzuodiqu}label-success{else}label-default{/if}" href="{dr_search_url($params, 'gongzuodiqu', $t.id)}">{$t.name}</a>
                            {/linkage}
                        </div>
                    </div>

                    <!--学历要求-->
                    <div class="news-search-param">
                        <div class="news-search-param-name">学历要求：</div>
                        <div class="news-search-param-value">
                        {php $field = dr_field_options('xueliyaoqiu');}
                        <a class="label {if !$params.xueliyaoqiu}label-success{else}label-default{/if}" href="{dr_search_url($params, 'xueliyaoqiu', NULL)}">不限</a>
                        {loop $field $i $t}
                        <a class="label {if $i==$params.xueliyaoqiu}label-success{else}label-default{/if}" href="{dr_search_url($params, 'xueliyaoqiu', $i)}">{$t}</a>
                        {/loop}
                    </div>
                    </div>


                    <!--每月薪资-->
                    <div class="news-search-param">
                        <div class="news-search-param-name">每月薪资：</div>
                        <div class="news-search-param-value">
                        {php $field = dr_field_options('meiyuexinzi');}
                        <a class="label {if !$params.meiyuexinzi}label-success{else}label-default{/if}" href="{dr_search_url($params, 'meiyuexinzi', NULL)}">不限</a>
                        {loop $field $i $t}
                        <a class="label {if $i==$params.meiyuexinzi}label-success{else}label-default{/if}" href="{dr_search_url($params, 'meiyuexinzi', $i)}">{$t}</a>
                        {/loop}
                    </div>
                    </div>


                    <div class="news-search-param">
                        <div class="input-group">
                            <input type="text" placeholder="输入关键字搜索" onkeypress="if(event.keyCode==13) {searchByClass();return false;}" name='keyword' value='{$keyword}' id='dr_search_keyword' class="form-control">
                            <span class="input-group-btn"> <button class="btn default"  onclick="searchByClass()" type="button"> <i class="fa fa-search"></i> 搜索 </button> </span>
                            <script type="text/javascript">
                                function searchByClass(){
                                    var url="{dr_search_url($params, 'keyword', 'phpkaiyuancms')}";
                                    var value=$("#dr_search_keyword").val();
                                    if (value) {
                                        location.href=url.replace('phpkaiyuancms', value);
                                    } else {
                                        dr_tips("输入关键字");
                                    }
                                }
                            </script>
                        </div>
                    </div>
                </div>


                <div class="news-content row">

                    <div class="col-md-12">
                        <div class="search-content">
                            <div class="title">
                                <div class="tabs clearfix">
                                    <ul>
                                        <li class="{if !$get.order || $get.order=='updatetime'}selected{/if}"><a href="{dr_search_url($params, 'order', null)}">时间排序</a></li>
                                        <li class="{if $get.order=='hits'}selected{/if}"><a href="{dr_search_url($params, 'order', 'hits')}">点击排序</a></li>
                                        <li class="{if $get.order=='comments'}selected{/if}"><a href="{dr_search_url($params, 'order', 'comments')}">评论排序</a></li>
                                    </ul>
                                </div>
                                <div class="fr clearfix">
                                    <span class="fl">共有</span><em>{$sototal}</em>条数据
                                </div>
                            </div>
                        {if $searchid}
                        <ul class="news-list">
                            <!--最新10条数据-->
                            {search order=$params.order id=$searchid total=$sototal catid=$catid page=1 pagesize=10 urlrule=$urlrule}
                            <li>
                                <div class="con">
                                    <h5><a href="{$t.url}">{dr_strcut($t.title, 30)}</a></h5>
                                    <p>{dr_strcut($t.description, 130)}</p>
                                    <dl class="clearfix">
                                        <dt class="time">{$t.updatetime}</dt>
                                        <dd class="browse"><i class="fa fa-eye"></i> {$t.hits}</dd>
                                    </dl>
                                </div>
                            </li>
                            {/search}
                        </ul>
                        <div class="news-list-pagination">
                            <ul class="pagination">
                                {$pages}
                            </ul>
                        </div>
                        {else}
                        <div class="no-feed"> <div class="empty-img"> <img src="{HOME_THEME_PATH}pc/img/empty_result.png" alt="404"> </div> <p>在这个星球中找不到</p> </div>
                        {/if}

                        </div>
                    </div>



                </div>

            </div>
        </div>

    </div>

</div>


{template "footer.html", "/"}